package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.TraCertificateMapper;
import com.ruoyi.bussiness.domain.TraCertificate;
import com.ruoyi.bussiness.service.ITraCertificateService;
import com.ruoyi.common.core.text.Convert;

/**
 * 培训证书Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class TraCertificateServiceImpl implements ITraCertificateService 
{
    @Autowired
    private TraCertificateMapper traCertificateMapper;

    /**
     * 查询培训证书
     * 
     * @param id 培训证书主键
     * @return 培训证书
     */
    @Override
    public TraCertificate selectTraCertificateById(Long id)
    {
        return traCertificateMapper.selectTraCertificateById(id);
    }

    /**
     * 查询培训证书列表
     * 
     * @param traCertificate 培训证书
     * @return 培训证书
     */
    @Override
    public List<TraCertificate> selectTraCertificateList(TraCertificate traCertificate)
    {
        return traCertificateMapper.selectTraCertificateList(traCertificate);
    }

    /**
     * 新增培训证书
     * 
     * @param traCertificate 培训证书
     * @return 结果
     */
    @Override
    public int insertTraCertificate(TraCertificate traCertificate)
    {
        return traCertificateMapper.insertTraCertificate(traCertificate);
    }

    /**
     * 修改培训证书
     * 
     * @param traCertificate 培训证书
     * @return 结果
     */
    @Override
    public int updateTraCertificate(TraCertificate traCertificate)
    {
        return traCertificateMapper.updateTraCertificate(traCertificate);
    }

    /**
     * 批量删除培训证书
     * 
     * @param ids 需要删除的培训证书主键
     * @return 结果
     */
    @Override
    public int deleteTraCertificateByIds(String ids)
    {
        return traCertificateMapper.deleteTraCertificateByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除培训证书信息
     * 
     * @param id 培训证书主键
     * @return 结果
     */
    @Override
    public int deleteTraCertificateById(Long id)
    {
        return traCertificateMapper.deleteTraCertificateById(id);
    }
}
